/**
 * 
 */

function Color(r, g, b, a)
{
	this.red = r;
	
	this.green = g;
	
	this.blue = b;
	
	this.alpha = a;
	
	this.setColor = function (r, g, b, a)
	{
		this.red = r;
		
		this.green = g;
		
		this.blue = b;
		
		this.alpha = a;
	};
	
	this.toHex = function(){
		
		var retVal = "";
		
		retVal = retVal + ((this.red.toString(16)) +
						  (this.green.toString(16)) +
						  (this.blue.toString(16)));
						  
		return retVal;
	}
	
	this.toString = function()
	{
		return "rgba(" + this.red + "," + this.green + "," + this.blue + "," + this.alpha + ")";
	};
}